package com.gmrz.webauthn.protocol.v1.schema;

import com.gmrz.webauthn.protocol.v1.processor.WebAuthnException;

import java.util.Arrays;


public class AuthenticatorAssertionResponse
        implements AuthenticatorResponse {
    private byte[] clientDataBytes;
    private CollectedClientData clientData;
    private byte[] signature;
    private AuthenticatorData authenticatorData;
    private byte[] authenticatorDataBytes;
    private byte[] userHandle;

    public byte[] getClientDataBytes() {
        return this.clientDataBytes;
    }

    public byte[] getSignature() {
        return this.signature;
    }

    public void setSignature(byte[] siganture) {
        this.signature = siganture;
    }

    public AuthenticatorData getAuthenticatorData() {
        return this.authenticatorData;
    }

    public void setAuthenticatorData(AuthenticatorData authenticatorData) {
        this.authenticatorData = authenticatorData;
    }

    public byte[] getAuthenticatorDataBytes() {
        return this.authenticatorDataBytes;
    }

    public void setAuthenticatorDataBytes(byte[] authenticatorDataBytes) {
        this.authenticatorDataBytes = authenticatorDataBytes;
    }

    public void setClientDataBytes(byte[] clientDataBytes) {
        this.clientDataBytes = clientDataBytes;
    }

    public void setClientData(CollectedClientData clientData) {
        this.clientData = clientData;
    }

    public CollectedClientData getClientData() throws WebAuthnException {
        return this.clientData;
    }

    public String toString() {
        return


                "AuthenticatorAssertionResponse [clientDataBytes=" + Arrays.toString(this.clientDataBytes) + ", clientData=" + this.clientData + ", signature=" + Arrays.toString(this.signature) + ", authenticatorData=" + this.authenticatorData + ", authenticatorDataBytes=" + Arrays.toString(this.authenticatorDataBytes) + "]";
    }

    public byte[] getUserHandle() {
        return this.userHandle;
    }

    public void setUserHandle(byte[] userHandle) {
        this.userHandle = userHandle;
    }
}
